package net.xdclass.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Allen
 * @version 1.0
 * @date 2022/11/21 17:19
 */
@Data
@TableName(value = "product_order")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ProductOrderDO implements Serializable {
    @TableId(value = "id", type = IdType.NONE)
    private Long id;

    /**
     * 订单类型
     */
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 商品标题
     */
    @TableField(value = "product_title")
    private String productTitle;

    /**
     * 商品单价
     */
    @TableField(value = "product_amount")
    private BigDecimal productAmount;

    /**
     * 商品快照
     */
    @TableField(value = "product_snapshot")
    private String productSnapshot;

    /**
     * 购买数ᰁ
     */
    @TableField(value = "buy_num")
    private Integer buyNum;

    /**
     * 订单唯⼀标识
     */
    @TableField(value = "out_trade_no")
    private String outTradeNo;

    /**
     * NEW 未⽀付订单,PAY已经⽀付订单,CANCEL超时取消订单
     */
    @TableField(value = "`state`")
    private String state;

    /**
     * 订单⽣成时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 订单总⾦额
     */
    @TableField(value = "total_amount")
    private BigDecimal totalAmount;

    /**
     * 订单实际⽀付价格
     */
    @TableField(value = "pay_amount")
    private Integer payAmount;

    /**
     * ⽀付类型，微信-银⾏-⽀付宝
     */
    @TableField(value = "pay_type")
    private String payType;

    /**
     * 账号昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * ⽤户id
     */
    @TableField(value = "account_no")
    private Long accountNo;

    /**
     * 0表示未删除，1表示已经删除
     */
    @TableField(value = "del")
    private Integer del;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     * 发票类型：0->不开发票；1->电⼦发票；2->纸质发票
     */
    @TableField(value = "bill_type")
    private String billType;

    /**
     * 发票抬头
     */
    @TableField(value = "bill_header")
    private String billHeader;

    /**
     * 发票内容
     */
    @TableField(value = "bill_content")
    private String billContent;

    /**
     * 发票收票⼈电话
     */
    @TableField(value = "bill_receiver_phone")
    private String billReceiverPhone;

    /**
     * 发票收票⼈邮箱
     */
    @TableField(value = "bill_receiver_email")
    private String billReceiverEmail;

    private static final long serialVersionUID = 1L;
}